// 设置body高度全屏
var height = window.screen.height;
document.querySelector("body").style.height = height-20 + "px";

(function($, doc) {
	$.init();
	$.ready(function() {
		var userInfo = localStorage.userInfo;
		console.log(userInfo);
		if(userInfo){
			doc.querySelector("#btnEnter").classList.remove("hid");
			doc.querySelector("#btnEnter").addEventListener("click",function () {
				$.openWindow({ //跳转首页
					
				})
			});
			return;
		}
		doc.querySelector("#content").classList.remove("hid");
		doc.querySelector("#area").addEventListener("click",function (event) {
			var target = event.target;
			var tagName = target.tagName;
			if(tagName === "A"){ //点击a标签
				var href = target.getAttribute("data-href");
				$.openWindow({
					url:"page/account/"+href+".html",
					id:href
				})
			}
		})
		
	});
}(mui, document));